﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using SolverLibrary.Data_Entities;

namespace UserManagementWCFService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "UserManagementService" in code, svc and config file together.
    // NOTE: In order to launch WCF Test Client for testing this service, please select UserManagementService.svc or UserManagementService.svc.cs at the Solution Explorer and start debugging.
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
    public class UserManagementService : IUserManagementService
    {
        UserManager manager = UserManager.INSTANCE;

        public void addUser(User user)
        {
            manager.addUser(user);
        }

        public User getUser(String username)
        {
            return manager.getUser(username);
        }

        public bool availableUserName(String username)
        {
            return manager.availableUserName(username);
        }

        public bool updatePassword(string password, User user)
        {
            return false;
        }
    }
}
